const ejs = require('ejs');

const fs = require('fs');

let html = fs.readFileSync('./西游.html').toString();


let xiyou = ['猪八戒','唐僧','沙僧','孙悟空'];

let res = ejs.render(html,{xiyou:xiyou})

console.log(res);